<?
/**
* Copyright (c) 2002-2007 BioWare Corp.
* http://www.bigdaddymonitor.org
*
* This file is part of the BigDaddy Monitoring
* program. It is free software distributed under
* the terms of the BSD License. It is ditributed
* in the hopes that it will be useful, but
* WITHOUT ANY WARRANTY; without event the implied
* warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE.
*
* The BSD License is available from:
* http://www.opensource.org/licenses/bsd-license.php
**/
?>

                <link rel="stylesheet" href="css/wiki_edit.css" type="text/css" />

<?


for ($i=0; $i<count($displayParams["aFormDisplay"]["aElements"]); $i++)
{
    switch ($displayParams["aFormDisplay"]["aElements"][$i]["sType"])
    {
        case "textarea":
            ?>

            <div class="wiki_general_padding">

                <textarea
                    name="<?=$displayParams["aFormDisplay"]["aElements"][$i]["name"];?>"
                    id="<?=$displayParams["aFormDisplay"]["aElements"][$i]["id"];?>"
                    class="<?=$displayParams["aFormDisplay"]["aElements"][$i]["class"];?>"
                    rows="50" cols="50"
                    
                    <?
                    if ($displayParams["bIsPreview"])
                    {
                        ?>
                        style="height: 200px;"
                        <?
                    }
                    ?>
                    
                    ><?=$displayParams["aFormDisplay"]["aElements"][$i]["value"];?></textarea>
            </div>
            <?
            break;
    
        case "hidden":
            ?>
            <input 
                type="hidden" 
                name="<?=$displayParams["aFormDisplay"]["aElements"][$i]["name"];?>" 
                value="<?=$displayParams["aFormDisplay"]["aElements"][$i]["value"];?>"
                id="<?=$displayParams["aFormDisplay"]["aElements"][$i]["id"];?>"
                class="<?=$displayParams["aFormDisplay"]["aElements"][$i]["class"];?>"
                >
                
            <?
            break;
    
        case "radio":
            ?>
           <input 
                type="radio" 
                name="<?=$displayParams["aFormDisplay"]["aElements"][$i]["name"];?>" 
                value="<?=$displayParams["aFormDisplay"]["aElements"][$i]["value"];?>"
                id="<?=$displayParams["aFormDisplay"]["aElements"][$i]["id"];?>"
                class="<?=$displayParams["aFormDisplay"]["aElements"][$i]["class"];?>"
                <?=$displayParams["aFormDisplay"]["aElements"][$i]["state"];?>
                >            
            <?=$displayParams["aFormDisplay"]["aElements"][$i]["description"];?>
            <?
            break;
        
        
        case "inputtext":
            ?>
            <div class="wiki_general_padding">
                <?=$displayParams["aFormDisplay"]["aElements"][$i]["description"];?>
    
    
                <input 
                    type="text" 
                    name="<?=$displayParams["aFormDisplay"]["aElements"][$i]["name"];?>" 
                    value="<?=$displayParams["aFormDisplay"]["aElements"][$i]["value"];?>"
                    id="<?=$displayParams["aFormDisplay"]["aElements"][$i]["id"];?>"
                    class="<?=$displayParams["aFormDisplay"]["aElements"][$i]["class"];?>"
                    >
            </div>
            <?
            break;
        
        case "ktmlactivex":
            
            ?>
            <input type="hidden" name="<?=$displayParams["aFormDisplay"]["aElements"][$i]["name"];?>" id="ktml1" value="<?=$displayParams["aFormDisplay"]["aElements"][$i]["value"];?>" />
            <script type="text/javascript">
                    // KTML4 Object
                    ktml_ktml1 = new ktml('ktml1');
            </script>
            <?
            //if ($displayParams["bIsPreview"])
            {
                $nKTMLHeight=200;
            }
            //else
            {
                $nKTMLHeight=400;
            }
        
            //require_once('ktml2/includes/ktedit/activex.php');
    
            //$KT_display = "Cut,Copy,Paste,Insert Table,Toggle Vis/Invis,Toggle WYSIWYG,Bold,Italic,Underline,Align Left,Align Center,Align Right,Align Justify,Background Color,Foreground Color,Undo,Redo,Bullet List,Numbered List,Indent,Outdent,HR,Font Type,Font Size,Insert WikiLink,Clean Word,Introspection,TableEdit";
            //showActivex($displayParams["aFormDisplay"]["aElements"][$i]["id"], '100%', $nKTMLHeight, false,$KT_display, "ktml2/", "ktml2/includes/styles/KT_styles.css", "../../../ktml2/images/uploads/", "../../../ktml2/files/uploads/",1, "English (UK)", -1, "english", "yes", "no");

            
        break;
    }
}
?>
